package com.gxa.p2p.service.impl;

import com.gxa.p2p.mapper.RepaymentMapper;
import com.gxa.p2p.pojo.Repayrecord;
import com.gxa.p2p.service.RepaymentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Bei
 * @date 2021/10/27 18:20
 */
@Service
public class RepaymentServiceImpl  implements RepaymentService {

    @Autowired
    RepaymentMapper repaymentMapper = null;

    @Override
    public List<Repayrecord> findRepay(String borrowName, String phone, Integer page, Integer size, String state1, String state2, String state3, String state4) {
        List<Repayrecord> repay = repaymentMapper.findRepay(borrowName, phone, (page - 1) * size, size, state1, state2, state3, state4);
        return repay;
    }

    @Override
    public Integer findRepayCount(String borrowName, String phone,  String state1, String state2, String state3, String state4) {
        Integer repayCount = repaymentMapper.findRepayCount(borrowName, phone,  state1, state2, state3, state4);
        return repayCount;
    }

    @Override
    public List<Repayrecord> findRepayCountExport(String borrowName, String phone, String state1, String state2, String state3, String state4) {
        List<Repayrecord> repayExport = repaymentMapper.findRepayExport(borrowName, phone, state1, state2, state3, state4);
        return repayExport;
    }
}
